package com.guonl.config;

import feign.Retryer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 方式一: feign原生的方式
 * 1-启用重试Retryer
 */
@Configuration
public class FeignRetryerConfiguration {

    @Bean
    public Retryer retryer(){
//        return Retryer.NEVER_RETRY; //代表永远不重试
        Retryer.Default retryer = new Retryer.Default();
        return retryer;
    }


}
